package com.xy.gateway.control.check.request;

import javax.servlet.http.HttpServletRequest;

import com.xy.gateway.model.EpayGateSetting;

public class PaymentReqCheckFactory {
	private static PaymentReqCheckFactory m_instance = new PaymentReqCheckFactory();

	private PaymentReqCheckFactory() {

	}

	public static PaymentReqCheckFactory getInstance() {
		return m_instance;
	}

	public PaymentReqCheck createPaymentCheck(HttpServletRequest req) {
		String sid = req.getParameter("sid");
		if (sid == null || sid.equals(""))
			return null;
		PaymentReqCheck check = null;
		if (sid.equals(EpayGateSetting.SID_CGB)) {
			check = new PaymentReqCheckStandart(req);
		} else if (sid.equals(EpayGateSetting.SID_CMB)) {
			check = new PaymentReqCheckStandart(req);
		}else if (sid.equals(EpayGateSetting.SID_ICBC)) {
			check = new PaymentReqCheckStandart(req);
		}else   {
			check = new PaymentReqCheckStandart(req);
		}
		return check;
	}
}
